﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Product_Info.ascx.cs" Inherits="AdminPortal_Controls_SanPham_Product_Info" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register src="../Toolbox.ascx" tagname="Toolbox" tagprefix="uc1" %>
<%@ Register src="../FileUpload.ascx" tagname="FileUpload" tagprefix="uc2" %>
<%@ Register src="../UploadMulti/FileUploadMulti.ascx" tagname="FileUploadMulti" tagprefix="uc3" %>
<%@ Register src="inc_ProductImages.ascx" tagname="inc_ProductImages" tagprefix="uc4" %>
<%--<%@ Register src="inc_SanPhamLienQuan.ascx" tagname="inc_SanPhamLienQuan" tagprefix="uc5" %>--%>
<script>
    function PhuKienDelByID() {
        var IDpk = $('[id$=ListPhuKien] option:selected').val(); 
        var urlDelPhuKien = "";
        if (IDpk != undefined) {
            urlDelPhuKien = '<%=Page.ResolveUrl("~/AdminPortal/Controls/SanPham/Ajax/PhuKien_DelByID.ashx?id=") %>' + IDpk;
            $.ajax({
                url: urlDelPhuKien,
                success: function (data) {
                    var iData = parseInt(data);
                    if (iData != -1) {
                        $('[id$=ListPhuKien] option:selected').remove();
                    }
                }
            });
        } else {
            showMessageSlide('Lỗi', 'Chọn một phụ kiện trước khi xoá!');
        }
    }
</script>
<span style="color:Red;font-style:italic;font-size:11px;margin-bottom:5px;display:block;"><asp:Label ID="lblthongbao" runat="server" Text=""></asp:Label></span>
<div id="HNGdatagrid">
    <div class="header-datagrid">
        <span class="icon-edit header-text">
                <asp:Label ID="lblTitle" runat="server" Text="Danh muc"></asp:Label>
        </span>
    </div>
    <div class="navibar-control">
            <uc1:Toolbox ID="Toolbox1" runat="server" ShowSave="true" OnSaveClick="btnSave_Click"
                                                      ShowDel="true" OnDelClick="btnDel_Click"
                                                      ShowApply="true" OnApplyClick="btnApply_Click"
                                                      ShowRefesh="true" ShowBack="true" OnBackClick="btnBack_Click"
                                                        />        
        <div class="clearB"></div>
    </div>
    <div class="content-main"> 
        <div id="bb" class="easyui-tabs" style="width:auto;height:auto;border-top:1px solid #99bbe8;">  
            <div title="Chi tiết" style="padding:5px;">  
                 <table cellpadding="0" cellspacing="0" width="100%" class="tableEditInfo">
                        <tr>
                            <td width="120" class="itemTableLeft">ID</td>
                            <td class="itemTableRight">
                                <asp:TextBox ID="txtID" runat="server" Width="50px" Enabled="false"></asp:TextBox>
                                <asp:HiddenField ID="hidID" runat="server" />
                            </td>
                        </tr>       
                        <tr>
                            <td class="itemTableLeft" width="130">Tiêu đề: </td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtTieude" runat="server" CssClass="BannerInput" Width="400"  class="easyui-validatebox" required="true" >
                                </asp:TextBox>         
                            </td>
                        </tr> 
                        <tr>
                            <td class="itemTableLeft" >Mã sản phẩm: </td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtBarcode" runat="server"></asp:TextBox>
                            </td>
                          </tr> 
                        <tr>
                            <td class="itemTableLeft" >Danh mục tin: </td>
                            <td align="left" class="itemTableRight">
                                <asp:DropDownList ID="ddlCategoryParent" runat="server" >
                                </asp:DropDownList>            
                            </td>
                        </tr>                                                 
                        <tr>
                            <td class="itemTableLeft" style="padding-top:10px" valign="top"> Ảnh: </td>
                            <td align="left" class="itemTableRight">                                
                                <uc2:FileUpload ID="FileUpload1" runat="server" UploadFolder="~/upload/Products/" />
                                <asp:Image ID="img_news" runat="server" Width="35" ImageAlign="Bottom" Visible="false" ></asp:Image>
                                &nbsp;<asp:ImageButton ID="imgbtn_Delete" runat="server" Width="16" Height="16" 
                                    onclick="imgbtn_Delete_Click" Enabled="false" ToolTip="xoá ảnh" /><asp:Label ID="lblDelete" runat="server" Text="xoá ảnh" Visible="false"/>
                            </td>
                        </tr>
                       <%-- <tr>
                            <td class="itemTableLeft">Tin hot:</td>
                            <td align="left">
                                <asp:CheckBox ID="chkTinHot" runat="server" Checked="True" />            
                            </td>
                        </tr>--%>  
                         <tr>
                            <td class="itemTableLeft">Giá hiện tại:</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox  ID="txtPriceCurrent" runat="server"></asp:TextBox>  
                                <asp:RegularExpressionValidator ID="Validate_Pcurent" runat="server" ControlToValidate="txtPriceCurrent"
                                                        Display="Dynamic" ErrorMessage="số không hợp lệ" 
                                    ValidationExpression="^\d+$" Font-Size="12px"></asp:RegularExpressionValidator>  
                                &nbsp;|&nbsp; Giá bán cũ: 
                                 <asp:TextBox  ID="txtPriceOld" runat="server"></asp:TextBox>  
                                 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPriceOld"
                                                        Display="Dynamic" ErrorMessage="số không hợp lệ" 
                                    ValidationExpression="^\d+$" Font-Size="12px"></asp:RegularExpressionValidator>
                            </td>
                        </tr> 
                        <tr>
                            <td class="itemTableLeft">Bảo hành:</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtTGbaoHanh" runat="server"></asp:TextBox>   
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtTGbaoHanh"
                                                        Display="Dynamic" ErrorMessage="số không hợp lệ" 
                                    ValidationExpression="^\d+$" Font-Size="12px"></asp:RegularExpressionValidator>
                                &nbsp;    
                                 <asp:DropDownList ID="ddlDVBaoHanh" runat="server"></asp:DropDownList>         
                            </td>
                        </tr>
                         <tr>
                            <td class="itemTableLeft" style="padding-top:10px" valign="top">Số lượng :</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtSoLuong" runat="server"></asp:TextBox> 
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtSoLuong"
                                                        Display="Dynamic" ErrorMessage="số không hợp lệ" 
                                    ValidationExpression="^\d+$" Font-Size="12px"></asp:RegularExpressionValidator>
                               |<font color="red"> Loại tiền tệ</font>: <asp:DropDownList ID="ddlTienTe" 
                                    runat="server"></asp:DropDownList>                                    
                                </td>
                        </tr>
                        <tr>
                            <td class="itemTableLeft">Tuỳ chọn:</td>
                            <td align="left" class="itemTableRight">
                                <asp:CheckBox ID="chkNoiBat" runat="server" Checked="True" Text="Sản phẩm nổi bật" />    
                                &nbsp;  
                                 <asp:CheckBox ID="chkHot" runat="server" Checked="True" Text="Sản phẩm hot" />    
                                &nbsp;  
                                <asp:CheckBox ID="chkStatus" runat="server" Checked="True" Text="Trạng thái" />    
                                  (Chọn mục này nếu bạn muốn ẩn / hiện thư mục tin)     
                            </td>
                        </tr> 
                        <tr>
                            <td class="itemTableLeft">Thứ tự:</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtThuTu" runat="server" Width="50"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtThuTu"
                                                        Display="Dynamic" ErrorMessage="số không hợp lệ" 
                                    ValidationExpression="^\d+$" Font-Size="12px"></asp:RegularExpressionValidator>
                            </td>
                        </tr> 
                        <tr>
                            <td class="itemTableLeft" style="padding-top:10px" valign="top">Tóm tắt theo list :</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtTomtatHome" runat="server" TextMode="MultiLine" Width="600" Height="50"></asp:TextBox> 
                                </td>
                        </tr> 
                        <tr>
                            <td class="itemTableLeft" style="padding-top:10px" valign="top">Tóm tắt :</td>
                            <td align="left" class="itemTableRight">
                                <asp:TextBox ID="txtTomTat" runat="server" TextMode="MultiLine" Width="600" Height="90"></asp:TextBox> 
                                </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                            Nội dung :<br />
                                <%--<FCKeditorV2:FCKeditor ID="fckMoTa" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Default">
                                </FCKeditorV2:FCKeditor>  --%>   
                                <hng:FCKeditor ID="fckMoTa" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Default"></hng:FCKeditor>    
                            </td>
                        </tr>      
                    </table>
            </div>  
            <div title="Hình ảnh" style="padding:5px;" runat="server" id="tabitem2">  
                <uc3:FileUploadMulti ID="FileUploadMulti1" runat="server" UploadFolder="~/upload/SubProducts/" />
                <uc4:inc_ProductImages ID="inc_ProductImages1" runat="server" />
            </div>
<%--            <div title="Sản phẩm liên quan " style="padding:5px;" runat="server" id="tabitem3">  
                <uc5:inc_SanPhamLienQuan ID="inc_SanPhamLienQuan1" runat="server" />
            </div>--%>  
            <%--<div title="Chi tiết sản phẩm" style="padding:5px;" runat="server" id="tabitem3">
                <table cellpadding="0" cellspacing="0" width="100%" class="tableEditInfo">
                    <tr>
                        <td class="itemTableRight" style="padding-top:10px;">
                        <span class="txtChitietsp">Tổng quan:</span> <br />
                            <hng:FCKeditor ID="fckTongquan" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Basic"></hng:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="itemTableRight">
                            <span class="txtChitietsp">Tính năng:</span><br/>
                            <hng:FCKeditor ID="fckTinhNang" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Basic"></hng:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="itemTableRight">
                            <span class="txtChitietsp">Bao gồm:</span><br/>
                            <hng:FCKeditor ID="fckBaogom" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Basic"></hng:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="itemTableRight">
                            <span class="txtChitietsp">Hình thức:</span><br/>
                            <hng:FCKeditor ID="fckHinhthuc" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "600" ToolbarSet="Basic"></hng:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="itemTableRight">
                            <span class="txtChitietsp">Bảo hành:</span><br/>
                            <hng:FCKeditor ID="fckBaohanh" runat="server" BasePath = "~/AdminPortal/fckeditor/" Width = "100%" Height = "500" ToolbarSet="Basic"></hng:FCKeditor>
                        </td>
                    </tr>
            </table> 
            </div>--%>
            <%--<div title="Phụ kiện " style="padding:5px;" runat="server" id="tabitem4"> 
                <table cellpadding="0" cellspacing="0" width="100%" class="tableEditInfo">
                        <tr>
                            <td width="100" class="itemTableLeft">Danh sách phụ kiện</td>
                            <td class="itemTableRight">
                                <asp:ListBox ID="ListPhuKien" runat="server" Width="250" Height="250"></asp:ListBox>
                                <input type="button" id="btnDelPhuKien" value="Xoá" style="padding:2px 5px;width:50px;" onclick="javascript:PhuKienDelByID();" />
                                (Chọn 1 trong các phụ kiện để xoá hoặc <asp:HyperLink ID="lnkAddPhuKien" runat="server" NavigateUrl="~/AdminPortal/Pages/PhuKienAdd.aspx" Text="thêm phụ kiện"></asp:HyperLink> )
                            </td>
                        </tr> 
            </table>                             
            </div>--%>
            <div title="Cấu hình seo" style="padding:5px;" runat="server" id="tabitem5">  
                <table cellpadding="0" cellspacing="0" width="100%" class="tableEditInfo">
                        <tr>
                            <td width="120" class="itemTableLeft">Meta Keyword</td>
                            <td class="itemTableRight">
                                <asp:TextBox ID="txtMetakeyword" runat="server" Width="550px" Height="100" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="120" class="itemTableLeft">Meta Description</td>
                            <td class="itemTableRight">
                                <asp:TextBox ID="txtMetaDescription" runat="server" Width="550px" Height="100" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                </table> 
            </div>      
        </div>               
    </div>
</div>